package com.supermarket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.supermarket.entity.Provider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProviderMapper extends BaseMapper<Provider> {
    Provider selectById(Long id);

    Provider selectByProName(String proName);
    
    List<Provider> selectAll();
    
    int insert(Provider provider);
    
    int update(Provider provider);
    
    int deleteById(Long id);
    
    List<Provider> getProviderList(@Param("start") int start, 
                             @Param("pageSize") Integer pageSize, 
                             @Param("proCode") String proCode,
                             @Param("proName") String proName);
                             
    int getProviderCount(@Param("proCode") String proCode,
                       @Param("proName") String proName);
}
